package JLB_Chapter_11;

public class code_11_07 {
    private Object b;
    public Object getB(){
        return b;
    }
    public void setB(Object b) {
        this.b = b;
    }
    public static void main(String[] args) {
        code_11_07 t= new code_11_07();
        // 向上转型操作
        t.setB(new Boolean(true));
        System.out.println(t.getB());
        t.setB(new Float(12.3));
        // 向下转型操作
        Float f = (Float) (t.getB());
        System.out.println(f);
    }
}
